import sqlite3
from connector.DatabaseDriver import DatabaseDriver
def get_user_by_id(driver: DatabaseDriver,user_id):
    return driver.select_one(sql="select * from user where user_id={}".format(user_id))
def get_user_by_username(driver: DatabaseDriver,user_name):
    return driver.select_one('select * from user where user_name={}'.format(user_name))
def get_user_by_username_add_password(driver: DatabaseDriver,username,password):
    return driver.select_one(sql='select * from user where user_name="{}" and user_password="{}"').format(username,password)
def get_username_by_user_id(driver: DatabaseDriver,user_id:int):
    return driver.query_one("select user_name from user where user_id={}".format())
def register_user(driver: DatabaseDriver,user_name,user_password,role_id):
    sql = 'inser into user(user_name,user_password,role_id) values("{}","{}",{})'.format(username,password,role_id)
def log